class Circle:
    def __init__(self, r):
        self.r = r

    @property
    def r(self):
        return self.__r

    @r.setter
    def r(self, value):
        if value > 0 and isinstance(value, int):
            self.__r = value
        else:
            raise AttributeError("半径必须为整数以及正数")

    @property
    def area(self):
        return self.__r * self.__r * 3.14


c1 = Circle(10)
print(c1.area)
